// 与用户相关的接口
import request from "@/utils/request";
import { loginForm, LoginInfoResponseData, userResponseData } from "./type"
enum UserApi {
  LOGIN_URL = "/admin/acl/index/login",
  USERINFO_URL = "/admin/acl/index/info",
  LOGOUT_URL = "/admin/acl/index/logout"
}



// 形参使用接口约束.
export const LoginApi = (data: loginForm) => request.post<any, userResponseData>(UserApi.LOGIN_URL, data)
export const UserInfoApi = () => request.get<any, LoginInfoResponseData>(UserApi.USERINFO_URL)
export const reqLogout = (token: string) => request.post<any>(UserApi.LOGOUT_URL, token)